<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <!-- INTERFACE -->
    <composite:interface>
        <composite:attribute name="labelHelp" required="false" default="#{cc.attrs.label}" shortDescription="La légende sur le label" ></composite:attribute>
        <composite:attribute name="labelInputHelp" required="false" default="#{cc.attrs.label}" shortDescription="La légende sur le champ text" ></composite:attribute>
        <composite:attribute name="label" required="true" ></composite:attribute>
        <composite:attribute name="valeur" required="true" ></composite:attribute>
        <composite:attribute name="_id" required="true" ></composite:attribute>
        <composite:attribute name="desactiver" required="false" shortDescription="Desactiver le champ text" ></composite:attribute>
        <composite:attribute name="readonly" required="false" default="false" shortDescription="En lecture seul pour le champ text" ></composite:attribute>        
        <composite:attribute name="required" required="false" default="false" shortDescription="Choix obligatoire/non obligatoire" ></composite:attribute>
        <composite:attribute name="sizeInput" required="false" shortDescription="la taille du champ text" ></composite:attribute>         
        <composite:attribute name="marginInputLabel" required="false" shortDescription="Espacement en pixel entre le label et le champ" ></composite:attribute>
        <!--    <composite:attribute name="nbInput" required="false" default="1" ></composite:attribute> -->
        <composite:attribute name="requiredMessage" required="false" shortDescription="Mesage du loadBundle, la balise h:message sera ajouter automatiquement" ></composite:attribute>
    </composite:interface>

    <!-- IMPLEMENTATION -->
    <composite:implementation>

        <!-- <h:panelGrid columns="2" border="1" > -->
        &nbsp;   
        <h:outputLabel escape="false" for="#{cc.attrs._id}" title="#{cc.attrs.labelHelp}" styleClass="inputTextLabelCss" >#{cc.attrs.label}</h:outputLabel> <c:if test="#{cc.attrs.required}" > <h:outputLabel value="*" style="color: red "/> </c:if>&nbsp;
        <p:inputText id="#{cc.attrs._id}" value="#{cc.attrs.valeur}" required="#{cc.attrs.required}" disabled="#{cc.attrs.desactiver}" readonly="#{cc.attrs.readonly}" requiredMessage="#{cc.attrs.requiredMessage}" style="margin-left:#{cc.attrs.marginInputLabel}px; margin-bottom: 1px;" size="#{cc.attrs.sizeInput}" >

            <composite:insertChildren /> <!-- INSERTION DE CONVERTISEUR, BALISE F  ou action AJAX-->

        </p:inputText>
        <p:watermark for="#{cc.attrs._id}" value="#{cc.attrs.labelInputHelp}"  />&nbsp;

        <c:if test="#{not empty cc.attrs.requiredMessage}" >
            <p:spacer width="11px"/>
            <h:message showSummary="true" showDetail="false" style="color: red; padding-right: 11px" for="#{cc.attrs._id}"/>
        </c:if>

    </composite:implementation>
</html>
